<template>
	<div>
		<el-container style="height: 650px; border: 1px solid #eee">
		  <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
		    <el-menu router="router" >
		        <el-menu-item-group>
					<el-menu-item index="adminIndex" @click="saveNavState('adminIndex')">
					  <span slot="title">首页</span>
					</el-menu-item>
				  <el-menu-item index="bookManager" @click="saveNavState('bookManager')">
				    <span slot="title">图书管理</span>
				  </el-menu-item>
				  <el-menu-item index="borrowManager" @click="saveNavState('borrowManager')">
				    <span slot="title">借阅管理</span>
				  </el-menu-item>
				 
		        </el-menu-item-group>
		    </el-menu>
		  </el-aside>
		  <el-container>
		    <el-main>
		      <router-view></router-view>
		    </el-main>
		  </el-container>
		</el-container>
	</div>
</template>

<script>
	export default {
	  data() {
	    return {
	      activePath: ""
	    };
	  },
	  methods: {
	    //保存链接的激活状态
	    saveNavState(activePath) {
	      window.sessionStorage.setItem("activePath", activePath);
	      this.activePath = activePath;
	    },
	  },
	};
</script>

<style>
</style>